import java.util.Random;

public class Division implements Operation
{
    private static final Random randomNumbers = new Random();
    private static final int DIVISOR_MAX_VALUE = 9;
    private static final int MAX_OPERAND_VALUE = 10;
    private int dividend;
    private int divisor;

    public Division()
    {
        divisor = randomNumbers.nextInt(DIVISOR_MAX_VALUE) + 1; //adding 1 to avoid divisor = 0
        dividend = divisor * randomNumbers.nextInt(MAX_OPERAND_VALUE);
    }

    @Override
    public String toString()
    {
        return dividend + " / " + divisor + " = ";
    }
    
    @Override
    public String getResult()
    {
        return Integer.toString(dividend / divisor);
    }
}
